package com.firexxx.study.designmodel.sixconcept.requirement.addprocessstep;

/**
 * @description: 满100 - 18
 * @author: zhuangzhang2
 * @date: 2021-01-04 15:43
 */
public class ReduceService implements IPreferential {

    @Override
    public int preferential(int price) {
        if (price < 0) {
            throw new IllegalArgumentException();
        }

        int rate = price / 100;
        return price - 18 * rate;
    }

}
